#pragma once

#include <QPushButton>

class MyButton : public QPushButton {
public:
	MyButton(QString iconName, QWidget* parent = nullptr);
	MyButton(QString iconName, int width, int height, QWidget* parent = nullptr);
	~MyButton();

protected:
	void enterEvent(QEnterEvent* ev);   //进入QWidget瞬间事件
	void leaveEvent(QEvent* ev);   //离开QWidget瞬间事件

private:

	QString m_iconName = "";


	void changeIcon(QString icon);
	void defaultStyle();
	void checkStyle();
};
